package com.estar.workplace.entity;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.lang.String;
import java.lang.Double;
import java.lang.Integer;
import java.math.BigDecimal;
import javax.xml.soap.Text;
import java.sql.Blob;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.SequenceGenerator;

import org.jeecgframework.core.common.entity.IdEntity;
import org.jeecgframework.poi.excel.annotation.Excel;

/**   
 * @Title: Entity
 * @Description: TMBL_WORK_PLACE
 * @author onlineGenerator
 * @date 2016-12-06 10:24:40
 * @version V1.0   
 *
 */
@Entity
@Table(name = "tmbl_work_place", schema = "")
@SuppressWarnings("serial")
public class TmblWorkPlaceEntity extends IdEntity  implements java.io.Serializable {
	
	/**序号*/
	@Excel(name="序号")
	private java.lang.String code;
	/**服务点名称*/
	@Excel(name="服务点名称")
	private java.lang.String workplace;
	/**服务点地址*/
	@Excel(name="服务点地址")
	private java.lang.String address;
	/**服务电话*/
	@Excel(name="服务电话")
	private java.lang.String telephone;
	
	private String isWork;
	
	@Column(name ="ISWORK")
	public String getIsWork() {
		return isWork;
	}

	public void setIsWork(String isWork) {
		this.isWork = isWork;
	}

	private TmblWorkPlaceEntity tmblWorkPlace;//上级地区
	private List<TmblWorkPlaceEntity> workPlaceList = new ArrayList<TmblWorkPlaceEntity>();//下级地区
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PARENTPLACEID")
	public TmblWorkPlaceEntity getTmblWorkPlace() {
		return tmblWorkPlace;
	}

	public void setTmblWorkPlace(TmblWorkPlaceEntity tmblWorkPlace) {
		this.tmblWorkPlace = tmblWorkPlace;
	}
	
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tmblWorkPlace")
	public List<TmblWorkPlaceEntity> getWorkPlaceList() {
		return workPlaceList;
	}

	public void setWorkPlaceList(List<TmblWorkPlaceEntity> workPlaceList) {
		this.workPlaceList = workPlaceList;
	}

	/**
	 *方法: 取得java.lang.String
	 *@return: java.lang.String  序号
	 */
	@Column(name ="CODE",nullable=false,length=32)
	public java.lang.String getCode(){
		return this.code;
	}

	/**
	 *方法: 设置java.lang.String
	 *@param: java.lang.String  序号
	 */
	public void setCode(java.lang.String code){
		this.code = code;
	}
	/**
	 *方法: 取得java.lang.String
	 *@return: java.lang.String  服务点名称
	 */
	@Column(name ="WORKPLACE",nullable=false,length=50)
	public java.lang.String getWorkplace(){
		return this.workplace;
	}

	/**
	 *方法: 设置java.lang.String
	 *@param: java.lang.String  服务点名称
	 */
	public void setWorkplace(java.lang.String workplace){
		this.workplace = workplace;
	}
	/**
	 *方法: 取得java.lang.String
	 *@return: java.lang.String  服务点地址
	 */
	@Column(name ="ADDRESS",length=150)
	public java.lang.String getAddress(){
		return this.address;
	}

	/**
	 *方法: 设置java.lang.String
	 *@param: java.lang.String  服务点地址
	 */
	public void setAddress(java.lang.String address){
		this.address = address;
	}
	/**
	 *方法: 取得java.lang.String
	 *@return: java.lang.String  服务电话
	 */
	@Column(name ="TELEPHONE",length=32)
	public java.lang.String getTelephone(){
		return this.telephone;
	}

	/**
	 *方法: 设置java.lang.String
	 *@param: java.lang.String  服务电话
	 */
	public void setTelephone(java.lang.String telephone){
		this.telephone = telephone;
	}
}
